set(core_rbtree_files
	RBTree.h
	RBTree.inl
	impl/RBTreeNode.h
	impl/RBTreeNode.inl
	impl/RBTreeIterator.h
	impl/RBTreeIterator.inl
)

if(WIN32)
set(core_platform_files
	win32/debug.cpp
)
elseif(UNIX)
set(core_platform_files
	unix/debug.cpp
)
endif()

set(core_unix_files
	unix/debug.cpp
)

set(core_main_files
	Algorithms.h
	array.h
	assert.cpp
	assert.h
	core.h
	debug.cpp
	debug.h
	defs.h
	error.h
	Event.h
	Event.inl
	exception.cpp
	exception.h
	ForEach.h
	Format.h
	Functors.cpp
	Functors.h
	Map.h
	noncopyable.h
	MessageHandlersMap.h
	MessageHandlersMap.inl
	pair.h
	ReadMe.txt
	Result.h
	Result.inl
	SmartPtr.h
	String.h
	StringStream.h
	types.h
	vector.h
)

set(core_all_files
	${common_misc_files}
	${core_rbtree_files}
	${core_platform_files}
	${core_main_files}
)

add_library(core ${core_all_files})
add_libs_target(core)

source_group(rbtree FILES ${core_rbtree_files})
source_group(platform FILES ${core_platform_files})
source_group(main FILES ${core_main_files})

add_common_properties(core)

add_subdirectory(tests)